/**
 * <pre>
 * - 初始化代码块的演示
 * Author : J.L.Zhou
 * E-Mail : 2233875735@qq.com
 * Tel : 151 1104 7708
 * Date : 2021-04-01 11:32
 * Version : 1.0
 * Copyright 2021 jlzhou.top Inc. All rights reserved.
 * Warning: this content is only for internal circulation of the company.
 *          It is forbidden to divulge it or use it for other commercial purposes.
 * </pre>
 **/
public class Demo {

  public static void main(String[] args) {
    Demo d1 = new Demo("1");
    Demo d2 = new Demo("2");
    System.out.println(d1);
    System.out.println(d2);
  }

  public Demo(String name) {
    System.out.println("调用了构造方法"+name);
  }

  static {
    System.out.println("静态初始化代码块");
  }
  {
    System.out.println("动态初始化代码块");
  }
}
